<?php
if (! defined ( 'BASEPATH' ))exit ( 'No direct script access allowed' );
class Users extends CI_controller{
    function __construct(){
     parent::__construct();
     $this->load->model('Users_model');
     $this->load->model('Rbac');
    }
    
    function user_list(){
     $r=$this->Users_model->queryAll();
     $info=array();
     foreach($r as $k=>$v){
     	$oper=$this->Rbac->getAll($v->u_name);
	      $info[$k]=array(
	       'u_id'=>$v->u_id,
	       'u_name'=>$v->u_name,
	       'oper'=>(array) $oper[0]
	      );
     }
     $data['users']=$info;
//     print_r($info);die();
    $this->load->view('admin/user_list',$data);
    }

}